import request from '../utils/request'

import store from '@/store'

// export const getUserChannelAPI = () => request({
//   url: '/v1_0/user/channels',
//   headers: {
//     Authorization: 'Bearer ' + store.state.token
//   }
// })
// console.log(store.state.token)
export const getuserapi = () => {
  return request({
    method: 'GET',
    url: '/v1_0/user/channels',
    headers: {
      Authorization: 'Bearer ' + store.state.token
    }
  })
}

export const getarticallist = ({ channelid, timestamp = Date.now() + '' }) => {
  return request({
    url: '/v1_0/articles',
    params: {
      channel_id: channelid,
      timestamp
    }
  })
}
